<template>
  <div>
    <navTop text="我的关注" />
    <div v-if="attention.length>0">
      <keepText :attention="item" :index="index" v-for="(item,index) in attention" :key="item.id" />
    </div>
    <van-empty description="没有关注用户" v-else />
  </div>
</template>

<script>
// import navTop from "../../components/navTop";
// import keepText from "../../components/keeptext";
export default {
  components: {
    navTop: () => import("../../components/navTop"),
    keepText: () => import("../../components/keeptext")
  },
  data() {
    return {
      attention: []
    };
  },

  created() {
    this.$axios({
      url: "/user_follows"
    }).then(res => {
      // console.log(res.data.data);
      const dataShow = res.data.data.map(user => {
        return { ...user, show: true };
      });
      this.attention = dataShow;
    });
  }
};
</script>

<style>
</style>
